/*
 * Character.h
 *
 *  Created on: Oct 8, 2011
 *  Created by: Devin Manno
 *  Updated by: Nick James, Devin Manno
 *	Last Update: Oct 12, 2011
 */
#ifndef CHARACTER_H_
#define CHARACTER_H_

#include "base.h"
#include "CharacterStats.h"
#include "EquipmentType.h"
#include "AttackType.h"
#include <string>
#include <iostream>
#include <vector>
using std::string;
using std::vector;


class Character: public Base{
private:
	CharacterStats characterStats;			// the character's stat attributes

	bool dead;					// the character's state of life/death

	vector<AttackType> attacks;			// a vector of the Character's attack abilities

	EquipmentType equipment[EquipmentType::maxSlots];		// a list of the Character's current equipment
	int maxEquipment;						// max number of equipment that a character can carry
	bool healthPotion;				// true if the Character holds a health potion
	bool actionPotion;			// true if the Character holds an action points potion

public:
	// constructors & destructor
	Character(string playerName);
	virtual ~Character();

	string generateNextID();			// generates a new, unique, character ID

	// getters
	CharacterStats getCharacterStats() const;
	int getNumAttacks() const;
	bool isDead() const;				// true if the Character is dead
	bool hasHealthPotion() const;			// true if the Character has a health potion
	bool hasActionPointsPotion() const;		// true if the Character has an action points potion

	// setters
	void pickupItem(EquipmentType item);		// add item's stats to character
	void dropItem(EquipmentType item);		// subtract item's stats to character, free up item
	void setDead(bool deadStatus);			// sets character's state of life/death
	string useHealthPotion();				// uses a health potion to restore the player's health
	string useActionPotion();				// uses an action potion to restore the player's action points
	//todo: Add other necessary setter functions

	// file operations
	bool save(string userID);			// save character to a file, by id
	Character load(string userID);			// load character from a file, by id

	// virtual function implementations
	string getClassName();
	void setObjectID(string objectID);
	void setDesc(string description);
};

#endif /* CHARACTER_H_ */
